<!DOCTYPE html>
<html lang="en" dir="ltr">

  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>login</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon">
    <link href="/static/css/reset.css" rel="stylesheet">
    <!-- Bootstrap3.3.5 CSS -->
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/css/login.css" rel="stylesheet"></head>

  <body>

    <div class="my-outer-layer">
      <div class="logon_centerBg logon_centerBg_my">
        <div class="width1200">

          <div class="login-box-my">
            <h2>登录</h2>
            <p>请使用
              <a href="#" target="_blank"><b>区块音乐账号</b> </a>进行登录</p>
            <div class="cr_top_my">
              <form id="fm1" action="/login" method="post" autocomplete="off">
                <p>
                  <span>用户名：</span>
                  <span>
                        <input type="text" id="id-name" name="Name" class="input_text">
                      </span>
                </p>
                <p>
                  <span>密码：</span>
                  <span>
                        <input type="text" id="id-password" name="password" class="input_text">
                      </span>
                </p>
                <input class="btn_login btn_login_my" name="submit" onclick="loginfcn()" accesskey="l" value="登&nbsp;&nbsp;录" tabindex="3" type="button" title="登录">
				<input class="btn_login btn_login_my" name="submit" onclick="register()" accesskey="l" value="注&nbsp;&nbsp;册" tabindex="3" type="button" title="注册">
              </form>
            </div>
          </div>
        </div>
      </div>
    </div>
  </body>
  <script type="text/javascript" src="/static/js/jquery.min.js"></script>
  <script type="text/javascript">

    function register() {
      location.href="toPage?param=register";
    }
    function loginfcn(){
      var name = $("#id-name").val();
      var password = $("#id-password").val();

      var user = localStorage.getItem(name);
      if(!user){
        alert("无此用户信息，请注册");
      }
      var ss = user.split("-");
      if(ss[5]==password){
        localStorage.setItem("loginUserNow",user);
        location.href="index";
      }else {
        alert("用户名或是密码错误");
      }

    }
      $(document).ready(function() {

      })
  </script>
  <style type="text/css">
      #popout{
          width: 100%;
          height: 100%;
          font-family: '微软雅黑';
          background-color: rgba(0,0,0,.5);
          position: absolute;
          z-index: 1;
          display: block;
      }
      .popout{
          width: 500px;
          height: auto;
          line-height: 30px;
          color: #000;
          font-size: 20px;
          background: #fff;
          padding: 30px;
          text-align: left;
          position: relative;
          left:50%;
          top: 200px;
          margin-left:-250px;
          z-index:1;
          border-radius: 2px;
      }
      .popout>div,.popout>div p{
          width: 100%;
          font-family: '微软雅黑';
          word-break: break-all;
          word-wrap: break-word;
      }
      .popout>div p:nth-of-type(1){
          color: #333;
          font-size: 20px;
          font-weight: bolder;
      }
      .popout>div p:nth-of-type(2){
          color: #58666e;
          font-size: 16px;
      }
      .popout>p{
          text-align: right;
      }
      .popout>p button{
          width: 100px;
          height: 40px;
          line-height: 40px;
          border: none;
          border-radius: 6px;
          outline: none;
          color: #fff;
          font-size: 18px;
          background-color: #3288e6;
          font-family: '微软雅黑';
          cursor: pointer;
      }
  </style>
</html>
